package com.navinfo.platform.dataanalysis.service;

import com.mongodb.spark.rdd.api.java.JavaMongoRDD;
import com.navinfo.platform.common.dto.DataInfo;
import org.apache.spark.api.java.JavaPairRDD;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SparkSession;
import org.bson.Document;

import java.util.List;
import java.util.Map;


public interface ILocationDataBussinessService {

    /***
     * 合并0200和0f37的怠速数据
     * @param dataset
     * @param dataset1
     * @return
     */
    JavaPairRDD<Long, List<DataInfo>> convert(Dataset<Row> realtimeDataset, Map<String, String> configMap);
    JavaPairRDD<Long, List<DataInfo>> unionData(JavaPairRDD<Long, List<DataInfo>> locationDataRdd, JavaPairRDD<Long, List<DataInfo>> realtimeDataRdd);
    void statisticInfo(SparkSession spark, JavaPairRDD<Long, List<DataInfo>> locationPairRDD, JavaPairRDD<Long, List<DataInfo>> dataInfoRdd,
                       Dataset<Row> basicInfo, Dataset<Row> idleInfo, JavaMongoRDD<Document> javaMongoRDD, Map<String, String> configMap);
}
